package com.ton.exception;

import com.ton.system.dto.ResultCode;

/**
 * 程序自定义异常
 */
public class ApplicationException  extends RuntimeException{

   //统一响应结果类型 (只读 )
   private ResultCode resultCode ;
   public ResultCode getResultCode () {
     return resultCode ;
  }
   public ApplicationException (ResultCode resultCode) {
     // 设置异常消息提示
     super (resultCode.getMessage ());
     this .resultCode = resultCode ;
  }
   public ApplicationException (ResultCode resultCode,String msg) {
     // 设置异常消息提示
     super (msg);
     this .resultCode = resultCode ;
  }

}
